package com.cyh.testdesignpattern.factory.absfactory.order;

import com.cyh.testdesignpattern.factory.absfactory.pizza.LdCheesePizza;
import com.cyh.testdesignpattern.factory.absfactory.pizza.LdGreePizza;
import com.cyh.testdesignpattern.factory.absfactory.pizza.Pizza;

public class LdFactory implements AbsFactory {
    @Override
    public Pizza createPizza(String orderType) {
        Pizza pizza = null;
        if(orderType.equals("gree")) {
            pizza = new LdGreePizza();
        } else if(orderType.equals("cheese")) {
            pizza = new LdCheesePizza();
        }
        return pizza;
    }
}
